package com.jeesite.modules.kj.api.vo.request.base;


import io.swagger.annotations.ApiModelProperty;

/**
 * request基础VO
 * @author hzy
 * @version 2019-08-09
 */
public abstract class BaseRequestVo<T>{
    @ApiModelProperty(value="列表查询每页显示条数,默认15", example = "15")
    private int pageSize;
    @ApiModelProperty(value="列表查询页码，默认为1", example = "1")
    private int pageNo;
    @ApiModelProperty(value="id")
    private String id;


    // 将requestVo转换为entity
    public abstract T convertToEntity();

    public int getPageSize() {
        return pageSize == 0 ? 15 : pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
